﻿#pragma once

#include "GameCoreScriptBinder.h"
#include "SoundTools.h"


_NAMESPACE_BEGIN

/// 工具集的脚本绑定类
class Tool_ScriptBinder
{
public:
	/// 单体类声明
	SINGLETON_HELPER(Tool_ScriptBinder);

	/// 构造函数
	Tool_ScriptBinder();
};

REGISTER_TYPEMETHODS(SoundEffect)
{		
	r = engine->RegisterObjectProperty(type, "string name",offsetof(T,name)); assert( r >= 0 );	
	r = engine->RegisterObjectProperty(type, "bool isPlaying",offsetof(T,isPlaying)); assert( r >= 0 );	
	r = engine->RegisterObjectProperty(type, "Vector3 pos",offsetof(T,pos)); assert( r >= 0 );	
	r = engine->RegisterObjectProperty(type, "float speed",offsetof(T,speed)); assert( r >= 0 );	
}

REGISTER_TYPEMETHODS(SoundTool)
{
	BASEMETHODS(type,T,Panel)
}

_NAMESPACE_END